package cn.itcast.web.rabbit;

import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class MailProducer {

	@Autowired
	private RabbitTemplate rabbitTemplate;

	public void send(String key,Object value) {
		rabbitTemplate.convertAndSend(key,value);
	}
}
